package com.itany.corejava.day15;

public class Producer extends Thread {

    private Store s;

    public Producer(String name,Store s) {
        super(name);
        this.s = s;
    }

    @Override
    public void run() {
        while(true){
            try {
                Thread.sleep(500);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            s.addData();
        }
    }
}
